# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-comm
pkgver=0.2.1
pkgrel=0
pkgdesc="Python comm implementation for the Jupyter kernel protocol"
url="https://github.com/ipython/comm"
arch="noarch"
license="BSD-3-Clause"
depends="py3-traitlets"
makedepends="py3-gpep517 py3-hatchling"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ipython/comm/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/comm-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages test-env
	test-env/bin/python3 -m installer \
		.dist/*.whl
	test-env/bin/python3 -m pytest
}

package() {
	python3 -m installer --destdir="$pkgdir" .dist/*.whl
}

sha512sums="
79f85dcd06a5e849718092a3148f39ad81c36a1903a51bd619f50d044cec6be7ca25e3fe7cd85c9174d76558b52dc77a1c3b49f1ed52b8f83e83a8a6ae7f3f0d  py3-comm-0.2.1.tar.gz
"
